Skip to content

Conversation

samueltardieu
Copy link
Member

@samueltardieu samueltardieu commented Jul 30, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 17 commits July 24, 2025 11:06
Tracks association between `self.sess.opts.externs` (aliases in `--extern alias=rlib`) and resolved `CrateNum`

Intended to allow Rustdoc match the aliases in `--extern-html-root-url`

Force-injected extern crates aren't included, since they're meant for the linker only
In favor of the adhoc `COMPILETEST_FORCE_STAGE0` env var.
…explicitly allowed

Otherwise, `compiletest` would have to know e.g. how to parse two
different target spec, if target spec format was changed between beta
`rustc` and in-tree `rustc`.
And move `./x test compiletest --stage=1` to `pr-check-2`, where testing
library artifacts already requires building the stage 1 compiler.
Support multiple crate versions in --extern-html-root-url

Rustdoc's `--extern-html-root-url` used to use `tcx.crate_name()` to identify crates, but that used crates' internal names from their metadata, instead of names given to them in `--extern`. That was confusing, because both `--extern…` arguments seem related and use similar syntax. Crucially, this didn't work correctly with Cargo's package aliases or multiple versions of crates.

`sess.opts.externs` lacks `CrateNum`, and `Resolver.extern_prelude` gets destroyed before `rustdoc` has a chance to see it, so I've had to save this mapping in `CStore`.

Just in case, I've kept the previous mapping by crate name as a fallback for crates that weren't matched by their extern name.

Fixes rust-lang#76296
…s, r=lolbinarycat

[rustdoc] Display total time and compilation time of merged doctests

Fixes rust-lang#144270.

Does it look good to you `@kpreid?`

<img width="908" height="263" alt="image" src="https://github.com/user-attachments/assets/cd5d082d-c4e0-42ed-91dd-bd263b413dcd" />
…trs, r=WaffleLapkin

clean up codegen fn attrs

This honestly had become a mess over time and needed some love. No behavior should've changed, and I effectively just moved code around. Though, I can't promise there weren't any bugs in the original code with how randomly it was organised.....

r? `@WaffleLapkin`
…bzol

Reject running `compiletest` self-tests against stage 0 rustc unless explicitly allowed

Currently, in `pr-check-1`, we run `python3 ../x.py test --stage 0 src/tools/compiletest`, which is `compiletest` self-tests against stage 0 rustc. This makes it very annoying for PRs wanting to change target spec JSON format, which `compiletest` depends on for target information, as otherwise `compiletest` would have to know how to handle 2 different target spec JSON formats and know when to pick which.

Instead of doing that, we change `compiletest` self-tests to reject running against stage 0 `rustc` *unless* explicitly allowed with `build.compiletest-allow-stage0=true`. `build.compiletest-allow-stage0` is a proper bootstrap config option in favor of the ad-hoc `COMPILETEST_FORCE_STAGE0` env var. This means that:

- `./x test src/tools/compiletest --stage=0` is not allowed, unless `build.compiletest-allow-stage0=true` is set. In this scenario, `compiletest` self-tests should be expected to fail unless the stage 0 `rustc` as provided is like codegen_cranelift where it's *actually* built from in-tree `rustc` sources.
- In CI, we change `./x test src/tools/compiletest --stage=0` to `./x test src/tools/compiletest --stage=1`, and move it to `pr-check-2`. Yes, this involves building the stage 1 compiler, but `pr-check-2` already has to build stage 1 compiler to test stage 1 library crates.
- Crucially, this means that **`compiletest` is only intended to support one target spec JSON format**, namely the one corresponding to the in-tree `rustc`.
- This should preserve the `compiletest-use-stage0-libtest` UX optimization where changing `compiler/` tree should still not require rebuilding `compiletest` as long as `build.compiletest-use-stage0-libtest=true`, as that should remain orthogonal. This is completely unlike my previous attempt at rust-lang#144563 that tries to do a way more invasive change which would cause the rebuild problem.

Best reviewed commit-by-commit.

---

r? `@Kobzol`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Jul 30, 2025
@samueltardieu
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented Jul 30, 2025

📌 Commit 202d1f5 has been approved by samueltardieu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 30, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 30, 2025
@bors
Copy link
Collaborator

bors commented Jul 30, 2025

⌛ Testing commit 202d1f5 with merge 3048886...

@bors
Copy link
Collaborator

bors commented Jul 30, 2025

☀️ Test successful - checks-actions
Approved by: samueltardieu
Pushing 3048886 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 30, 2025
@bors bors merged commit 3048886 into rust-lang:master Jul 30, 2025
1 check passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 30, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#143465 Support multiple crate versions in --extern-html-root-url ec9a02c3a8ec52898abe2a7bbf1af04250efac0a (link)
#144308 [rustdoc] Display total time and compilation time of merged… 9064be6b488be49a0d2bd0440a5f02b9ca2c15e7 (link)
#144655 clean up codegen fn attrs f7a7141b7dba8263fab31ea3e6b48ba37dd25de0 (link)
#144675 Reject running compiletest self-tests against stage 0 rus… e99d11b78378f1f8ad923f5fb8500adb9180b15a (link)

previous master: e5e79f8bd4

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@samueltardieu samueltardieu deleted the rollup-0j1y08x branch July 30, 2025 21:30
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e5e79f8 (parent) -> 3048886 (this PR)

Test differences

Show 136 test diffs

Stage 0

  • directives::tests::asm_support: pass -> [missing] (J0)
  • directives::tests::channel: pass -> [missing] (J0)
  • directives::tests::debugger: pass -> [missing] (J0)
  • directives::tests::families: pass -> [missing] (J0)
  • directives::tests::git_hash: pass -> [missing] (J0)
  • directives::tests::ignore_arch: pass -> [missing] (J0)
  • directives::tests::ignore_coverage: pass -> [missing] (J0)
  • directives::tests::ignore_target: pass -> [missing] (J0)
  • directives::tests::is_big_endian: pass -> [missing] (J0)
  • directives::tests::llvm_version: pass -> [missing] (J0)
  • directives::tests::matches_abi: pass -> [missing] (J0)
  • directives::tests::matches_env: pass -> [missing] (J0)
  • directives::tests::pointer_width: pass -> [missing] (J0)
  • directives::tests::profiler_runtime: pass -> [missing] (J0)
  • directives::tests::rustc_debug_assertions: pass -> [missing] (J0)
  • directives::tests::sanitizers: pass -> [missing] (J0)
  • directives::tests::should_fail: pass -> [missing] (J0)
  • directives::tests::stage: pass -> [missing] (J0)
  • directives::tests::std_debug_assertions: pass -> [missing] (J0)
  • directives::tests::test_assembly_mode_forbidden_revisions: pass -> [missing] (J0)
  • directives::tests::test_codegen_mode_forbidden_revisions: pass -> [missing] (J0)
  • directives::tests::test_duplicate_revisions: pass -> [missing] (J0)
  • directives::tests::test_error_annotation_no_error: pass -> [missing] (J0)
  • directives::tests::test_ignore_auxiliary: pass -> [missing] (J0)
  • directives::tests::test_llvm_version_invalid_components: pass -> [missing] (J0)
  • directives::tests::test_llvm_version_invalid_prefix: pass -> [missing] (J0)
  • directives::tests::test_llvm_version_too_many_components: pass -> [missing] (J0)
  • directives::tests::test_miropt_mode_forbidden_revisions: pass -> [missing] (J0)
  • directives::tests::test_needs_target_std: pass -> [missing] (J0)
  • directives::tests::test_non_rs_unknown_directive_not_checked: pass -> [missing] (J0)
  • directives::tests::test_not_trailing_directive: pass -> [missing] (J0)
  • directives::tests::test_parse_normalize_rule: pass -> [missing] (J0)
  • directives::tests::test_rustc_abi: pass -> [missing] (J0)
  • directives::tests::test_trailing_directive_with_comment: pass -> [missing] (J0)
  • directives::tests::test_unknown_directive_check: pass -> [missing] (J0)
  • directives::tests::threads_support: pass -> [missing] (J0)
  • directives::tests::wasm_special: pass -> [missing] (J0)
  • read2::tests::test_abbreviate_filters_avoid_abbreviations: pass -> [missing] (J0)
  • read2::tests::test_abbreviate_filters_can_still_cause_abbreviations: pass -> [missing] (J0)
  • read2::tests::test_abbreviate_filterss_are_detected: pass -> [missing] (J0)
  • read2::tests::test_abbreviate_short_string: pass -> [missing] (J0)
  • read2::tests::test_abbreviate_short_string_multiple_steps: pass -> [missing] (J0)
  • runtest::tests::normalize_platform_differences: pass -> [missing] (J0)
  • tests::is_test_test: pass -> [missing] (J0)
  • tests::string_enums: pass -> [missing] (J0)
  • tests::test_extract_gdb_version: pass -> [missing] (J0)
  • tests::test_extract_lldb_version: pass -> [missing] (J0)
  • util::tests::path_buf_with_extra_extension_test: pass -> [missing] (J0)

Stage 1

  • directives::tests::asm_support: [missing] -> pass (J1)
  • directives::tests::aux_build: [missing] -> pass (J1)
  • directives::tests::channel: [missing] -> pass (J1)
  • directives::tests::cross_compile: [missing] -> pass (J1)
  • directives::tests::debugger: [missing] -> pass (J1)
  • directives::tests::ignore_arch: [missing] -> pass (J1)
  • directives::tests::ignore_coverage: [missing] -> pass (J1)
  • directives::tests::ignore_target: [missing] -> pass (J1)
  • directives::tests::is_big_endian: [missing] -> pass (J1)
  • directives::tests::matches_env: [missing] -> pass (J1)
  • directives::tests::matches_os: [missing] -> pass (J1)
  • directives::tests::profiler_runtime: [missing] -> pass (J1)
  • directives::tests::revisions: [missing] -> pass (J1)
  • directives::tests::rustc_debug_assertions: [missing] -> pass (J1)
  • directives::tests::sanitizers: [missing] -> pass (J1)
  • directives::tests::should_fail: [missing] -> pass (J1)
  • directives::tests::stage: [missing] -> pass (J1)
  • directives::tests::std_debug_assertions: [missing] -> pass (J1)
  • directives::tests::test_assembly_mode_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_codegen_mode_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_duplicate_revisions: [missing] -> pass (J1)
  • directives::tests::test_error_annotation_no_error: [missing] -> pass (J1)
  • directives::tests::test_extract_llvm_version: [missing] -> pass (J1)
  • directives::tests::test_extract_version_range: [missing] -> pass (J1)
  • directives::tests::test_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_ignore_auxiliary: [missing] -> pass (J1)
  • directives::tests::test_known_directive_check_no_error: [missing] -> pass (J1)
  • directives::tests::test_llvm_version_invalid_components: [missing] -> pass (J1)
  • directives::tests::test_llvm_version_invalid_prefix: [missing] -> pass (J1)
  • directives::tests::test_miropt_mode_forbidden_revisions: [missing] -> pass (J1)
  • directives::tests::test_needs_target_std: [missing] -> pass (J1)
  • directives::tests::test_non_rs_unknown_directive_not_checked: [missing] -> pass (J1)
  • directives::tests::test_not_trailing_directive: [missing] -> pass (J1)
  • directives::tests::test_parse_normalize_rule: [missing] -> pass (J1)
  • directives::tests::test_rustc_abi: [missing] -> pass (J1)
  • directives::tests::test_supported_crate_types: [missing] -> pass (J1)
  • directives::tests::test_trailing_directive_with_comment: [missing] -> pass (J1)
  • directives::tests::test_unknown_directive_check: [missing] -> pass (J1)
  • directives::tests::threads_support: [missing] -> pass (J1)
  • directives::tests::wasm_special: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_filterss_are_detected: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_short_string: [missing] -> pass (J1)
  • read2::tests::test_abbreviate_short_string_multiple_steps: [missing] -> pass (J1)
  • runtest::tests::normalize_platform_differences: [missing] -> pass (J1)
  • tests::is_test_test: [missing] -> pass (J1)
  • tests::string_enums: [missing] -> pass (J1)
  • tests::test_extract_gdb_version: [missing] -> pass (J1)
  • tests::test_extract_lldb_version: [missing] -> pass (J1)
  • util::tests::path_buf_with_extra_extension_test: [missing] -> pass (J1)
  • [rustdoc] tests/rustdoc/extern/extern-html-fallback.rs: [missing] -> pass (J3)

Stage 2

  • [rustdoc] tests/rustdoc/extern/extern-html-alias.rs: [missing] -> pass (J2)
  • [rustdoc] tests/rustdoc/extern/extern-html-fallback.rs: [missing] -> pass (J2)

(and 32 additional test diffs)

Additionally, 4 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 3048886e59c94470e726ecaaf2add7242510ac11 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-apple: 7422.2s -> 5252.5s (-29.2%)
  2. x86_64-apple-2: 5545.0s -> 4095.6s (-26.1%)
  3. x86_64-apple-1: 7818.8s -> 6332.2s (-19.0%)
  4. dist-x86_64-apple: 8886.5s -> 7551.0s (-15.0%)
  5. pr-check-1: 1752.4s -> 1502.9s (-14.2%)
  6. dist-sparcv9-solaris: 5917.4s -> 5123.7s (-13.4%)
  7. i686-gnu-nopt-1: 8168.4s -> 7270.1s (-11.0%)
  8. i686-gnu-2: 6139.7s -> 5501.0s (-10.4%)
  9. dist-aarch64-msvc: 5004.2s -> 5463.9s (9.2%)
  10. i686-gnu-1: 7938.3s -> 7256.2s (-8.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3048886): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.9%, 1.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.1%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.5%, secondary -1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.7% [3.7%, 3.7%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-2.7% [-2.7%, -2.7%] 1
Improvements ✅
(secondary)
-2.9% [-3.2%, -2.5%] 4
All ❌✅ (primary) 0.5% [-2.7%, 3.7%] 2

Cycles

Results (secondary 4.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.3% [4.3%, 4.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.342s -> 470.294s (0.20%)
Artifact size: 376.86 MiB -> 376.85 MiB (-0.00%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 30, 2025
@panstromek
Copy link
Contributor

perf triage:

match-stress is a bimodal noise.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants